//Header File for the Groovey Particle class
#ifndef GPART
#define GPART

#include <boost/numeric/ublas/vector.hpp>

class GParticle{
	public:
		GParticle(	const int Life,
		          	const int Size,
					const boost::numeric::ublas::vector<float>& Loc,
					const boost::numeric::ublas::vector<float>& Vel,
					const boost::numeric::ublas::vector<float>& Acc);
		GParticle(); ////be careful with the ability to do this.
		
			//////////
		//////Life control
		////////////////////
		
		///pre: particle should be alive. Unspecified results otherwise
		
		int Die(const int Damage); 		///result: Life reduced by damage, and lives left returned
		bool Dead();					///result: Return lives remaining
		void setLives(const int Lives);	///DEBUG! Result: reset lives to setting here... this is not with setters since this is special and debug only
		
			//////////
		//////Manipulations (should be mostly used by Transform. We'll give transformer's handles later
		///////////////////
		
		///pre: particle should be alive and location, velocity, and acceleration defined
		
		bool Update(const int limit_X, const int limit_Y);		///result: location and velocity are updated, 
																///////returns 1 if the particle is now 
																///////outside it's limits
		void Accelerate(const boost::numeric::ublas::vector<float> Jerk);
																///result: change the acceleration appropriately
		
			//////////
		/////Basic information retreival...
		///////////////////
		
		////pre: Make sure that these values are set before get, otherwise unspecified returns
		/////////if you are setting, make sure the passed vectors are float and position vector is NOT negative
		
		//getters
		int getLife() const; ////heehee... get a life..... hehehehehe.... I'm so funny, dude!
		int getSize() const;
		boost::numeric::ublas::vector<float> getLoc() const;////result: vector containing loc is returned
		boost::numeric::ublas::vector<float> getVel() const;////result: vector containing vel is returned
		boost::numeric::ublas::vector<float> getAcc() const;////result: vector containing acc is returned
		
		//setters
		void setSize(const int Size);						  ////result: size of this particle is set to Size
		void setLoc(boost::numeric::ublas::vector<float>& Loc);////result: vector is now the loc of this particle
		void setVel(boost::numeric::ublas::vector<float> Vel);////result: vector is now the vel of this particle
		void setAcc(boost::numeric::ublas::vector<float> Acc);////result: vector is now the acc of this particle
		
		//referenced getters (NOTE: the regular getters create a vector and pass it... these do not!
		boost::numeric::ublas::vector<float>& Loc();////result: reference to this->loc is returned
		boost::numeric::ublas::vector<float>& Vel();////result: reference to this->vel is returned
		boost::numeric::ublas::vector<float>& Acc();////result: reference to this->acc is returned
		
			//////////
		/////operations
		////////////////////
		
		///pre for assignment: GPart should have a size and life for now. Location, velocity, and acceleration are not used, however.
		void operator=(const GParticle& GPart);
		/*///
		void operator()(); ///result: how cool is this? This is going to be how particles interact.
		*/
		
	//////
	//////Privates:
	//////
	private:
		int life, size, color; ///we'll refine color to an array later
		boost::numeric::ublas::vector<float> loc, vel, acc; ///every particle must have a location, 
															///////velocity and acceleration
	
};

#endif
